@{
  Layout = "_LayoutBase";
    var postPages = Model.DocumentList(Keys.PageDocuments).OrderByDescending(x => x.Get<DateTime>(BlogKeys.Published));
        string tag = Model.String(BlogKeys.Tag).ToLowerInvariant().Replace(' ', '-');
        tag = tag.StartsWith(".") ? tag.Substring(1) : tag;
}

      <a class="nav nav--white" href="@Context.GetLink("/")">
      <i class="fa fa-lg fa-arrow-left"></i>
      <span>Back to Posts</span>
    </a>

<section class="previews">
  <div>
    @foreach(var post in postPages)   
    { 
        var imageString = post.String(BlogKeys.Image) ?? "/assets/images/background.jpg";
      <figure class="absolute-bg preview__img" style="background-image: url('@imageString');"></figure>
    }
    <div id="particles-js" class="previews__container">
      <span>Category</span>
        <h1>@tag</h1>

    </div>
  </div>

  <div>
    <header>
      <ul class="tabs">
        <li class="tabs__item">@tag</li>
        <li class="tabs__item">tags</li>
      </ul>
    </header>
<div class="tab">
    @Html.Partial("_PostsSection",postPages)
    @Html.Partial("_Pagination") 
<!--page footer -->
@Html.Partial("_PageFooter", true)
    </div>
    @Html.Partial("_TagSection") 
  </div>
 
</section> 